<HTML><HEAD><TITLE>instrument_control(+Mode, +InstrumentPredSpec)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(instrument)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>instrument_control(+Mode, +InstrumentPredSpec)</H1>
Insert or remove instrumentation predicates dynamically 
   at runtime.
<DL>
<DT><EM>Mode</EM></DT>
<DD>Atom
</DD>
<DT><EM>InstrumentPredSpec</EM></DT>
<DD>PredSpec
</DD>
</DL>
<H2>Description</H2>
<P>
   If the <TT>asserted</TT> option of an <TT>itemplate</TT> 
   is set to one of <TT>on</TT>, <TT>off</TT> or 
   <TT>post_compile</TT> then the template's instrumentation 
   predicates may be inserted and removed dynamically at runtime.
   <P>
   When Mode is <TT>on</TT> the instrumentation predicate 
   represented is PredSpec is inserted into the code at the 
   positions specified during instrumentation. This is done 
   efficiently with negligible runtime overhead. When Mode is 
   <TT>off</TT> the instrumentation predicate is removed from 
   the instrumented code.
   <P>
   If PredSpec is module qualified, the instrumentation predicate 
   defined in the context of the module is inserted / removed. If 
   unqualified the predicate is assumed to be defined in the context 
   of the calling module scope.
   <P>
   The predicate is a tool and an unqualified instrumentation 
   predicate defined in a module other than the current 
   calling module context can be inserted / removed by invoking 
   <TT>instrument_control(Mode, InstrumentPredSpec)@Module</TT>.
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Fail Conditions</H3>
InstrumentPredSpec is not a predicate specification.
<H3>Resatisfiable</H3>
no
<H3>Exceptions</H3>
<DL>
<DT><EM>(68) calling an undefined procedure </EM>
<DD>PredSpec is an undefined procedure.
</DL>
<H2>See Also</H2>
<A HREF="../../lib/instrument/instrument-2.html">instrument / 2</A>, <A HREF="../../lib/instrument/instrument-3.html">instrument / 3</A>, <A HREF="../../lib/instrument/index.html">library(instrument)</A>, <A HREF="../../lib/instrument/itemplate-s.html">struct(itemplate)</A>
</BODY></HTML>
